home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / gnugrep-1.5 / Makefile < prev    next >
Encoding:
Makefile  |  1995-06-06  |  1.1 KB  |  55 lines

  1. DESTDIR=/usr/skunk
  2. #
  3. # Makefile for GNU e?grep
  4. #
  5. CC = cc
  6.  
  7. # Add -DUSG for System V.
  8. CFLAGS = -O -DUSG -Dsco
  9.  
  10. TARGET=  grep egrep
  11. SRCS= dfa.c regex.c alloca.c
  12.  
  13. #
  14. # You may add getopt.o if your C library lacks getopt(); note that
  15. # 4.3BSD getopt() is said to be somewhat broken.
  16. #
  17. # Add alloca.o if your machine does not support alloca().
  18. #
  19. OBJS = dfa.o regex.o alloca.o
  20. GOBJ = grep.o
  21. EOBJ = egrep.o
  22.  
  23. # Space provided for machine dependent libraries.
  24. LIBS =
  25.  
  26. all: regress grep.1
  27.  
  28. regress: egrep grep
  29.     cd tests; sh regress.sh
  30.  
  31. egrep: $(OBJS) $(EOBJ)
  32.     $(CC) $(CFLAGS) -o egrep $(OBJS) $(EOBJ) $(LIBS)
  33.  
  34. egrep.o: grep.c
  35.     rm -f egrep.c; cp grep.c egrep.c
  36.     $(CC) $(CFLAGS) -DEGREP -c egrep.c
  37.     rm -f egrep.c
  38.  
  39. grep: $(OBJS) $(GOBJ)
  40.     $(CC) $(CFLAGS) -o grep $(OBJS) $(GOBJ) $(LIBS)
  41.  
  42. install: $(TARGET) inst-man
  43.     scoinst -s grep  $(DESTDIR)/bin/gnugrep
  44.     scoinst -s egrep $(DESTDIR)/bin/gnuegrep
  45.  
  46. clobber clean:
  47.     rm -f grep egrep *.o core tests/core tests/tmp.script \
  48.     tests/khadafy.out egrep.c
  49.  
  50. inst-man:
  51.     scoinst -c -m 444 grep.1 $(DESTDIR)/man/man.1/gnugrep.1
  52.  
  53. dfa.o egrep.o grep.o: dfa.h
  54. egrep.o grep.o regex.o: regex.h
  55.